import {searchSpan} from "@/api/span";

export const optionParent = {
  calcHeight: 95,
  tip: false,
  searchShow: true,
  searchMenuSpan: searchSpan(3),
  border: true,
  index: true,
  viewBtn: false,
  menuWidth: 150,
  dialogWidth: 880,
  dialogClickModal: false,
  selection:true,
  addBtn: false,
  delBtn:false,
  editBtn:false,
  column: [
    {
      label: '调拨单号',
      prop: 'transferNo',
      search: true,
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
    },
    {
      label: '目标库区',
      prop: 'areaName',
      search: true,
      searchSpan:12,
      searchslot:true,
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
    },
    {
      label: '业务编码',
      prop: 'businessCode',
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false
    },

    {
      label: '业务描述',
      prop: 'businessDesc',
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false
    },
    {
      label: '业务状态',
      prop: 'status',
      type: "select",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      dicData: [
        {
          label: "保存",
          value: 1
        },{
          label: "提交",
          value: 2
        },
        {
          label: "已审核",
          value: 3
        },
        {
          label: "执行下达",
          value: 4
        },{
          label: "正在盘点",
          value: 5
        },
        {
          label: "盘点完成",
          value: 6
        },
        {
          label: "已驳回",
          value: 7
        },
        {
          label: "已完成",
          value: 8
        },

      ],
    },
    {
      label: '入库单号',
      prop: 'inputNo',
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
    },

    {
      label: '出库人',
      prop: 'outputUserName',
      addDisplay:false,
      editDisplay:false,
      viewDisplay: false
    },
    {
      label: '出库时间',
      prop: 'outputTime',
      width:150,
      addDisplay:false,
      editDisplay:false,
      viewDisplay: false

    },

  ],
  group:[{
    label:"调拨信息",
    column: [
      {
        label: '调拨单号',
        prop: 'transferNo',
        addDisplay:false,
        editDisabled:true,
      },
      {
        label: '目标库区',
        prop: 'areaId',
        formslot:true,
        type:"select",
        viewDisplay:false,
        rules:[
          {
            required:true,
            message:"请选择目标库区",
            trigger:"blur"
          }
        ]
      },
      {
        label: '目标库区',
        prop: 'areaName',
        addDisplay: false,
        editDisplay:false,
      },
      {
        label: '业务类目',
        prop: 'businessId',
        formslot:true,
        type:"select",
        rules:[
          {
            required:true,
            message:"请选择业务类目",
            trigger:"blur"
          }
        ],
        viewDisplay: false,
      },
      {
        label: '业务编码',
        prop: 'businessCode',
        addDisplay: false,
        editDisplay: false,
      },
      {
        label: '业务描述',
        prop: 'businessDesc',
        addDisplay: false,
        editDisplay: false,
      },
      {
        label: '备注',
        prop: 'remark',
        span:24,
        minRows:3,
        type: "textarea",
        maxlength:100,
        showWordLimit:true
      },
      {
        title: '',
        component: 'el-divider',
        span: 24,
        labelWidth: '0px',
        params: {
          contentPosition: 'left'
        },
      },
    ],
  }]
};

export const optionChild = {
  calcHeight: 95,
  tip: false,
  searchShow: true,
  tree: true,
  border: true,
  index: true,
  viewBtn: true,
  menuWidth: 220,
  dialogWidth: 880,
  dialogClickModal: false,
  menu:false,
  addBtn:false,
  column: [
    {
      label:'物料编码',
      prop:'materialCode'
    },
    {
      label:'物料名称',
      prop:'materialName'
    },
    {
      label:'规格',
      prop:'materialSpec'
    },
    {
      label:'型号',
      prop:'materialModel'
    },
    {
      label:'零件图号',
      prop:'materialDraw'
    },
    {
      label:'生产日期',
      prop:'productDate'
    },
    {
      label:'生产批次',
      prop:'productBatch'
    },
    {
      label:'调拨箱数',
      prop:'transferBox'
    },
    {
      label:'调拨数量',
      prop:'transferNum'
    },
    {
      label:'未扫描箱数',
      prop:'unScanBox'
    },
    {
      label:'未扫描数量',
      prop:'unScanNum'
    }, {
      label: '最新统计时间',
      prop: 'updateTime'
    }
  ]
};
